home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
bbsutil
/
kbbs_40.zip
/
407.KBB
< prev
next >
Wrap
Text File
|
1994-05-25
|
3KB
|
82 lines
MAY 25, 1994
KBBS Manual
ANSI Control Codes
KISSWARE WORKS! ANSI Control Codes -- 407
K|eep
I|t KISSWARE BULLETIN BOARD SYSTEM
S|imple (c) 1991-1994 by Robert Zee
S|oftware All Rights Reserved
─────────────────────────────────────────────────────────────────
-*ANSI Control Codes*-
THIS IS AN ADVANCED FEATURE. IF YOU ARE NEW TO COMPUTERS, YOU
MIGHT WANT TO SKIP THIS SECTION UNTIL YOU ARE MORE FAMILIAR WITH
KBBS AND ITS OPERATION.
ANSI Control Codes, or Escape Sequences, change colors, control
cursor and display location, and clear the screen. ANSI codes
include the escape character (ASCII #27), the left bracket ("["),
and a character or characters that follow. No spaces are allowed
between these characters, and none is needed before of after. If
you include leading or trailing spaces, they will be displayed.
If you imbed spaces between the characters, the ANSI code will
fail.
Spaces are used for clarity; omit spaces when using ANSI codes.
More information can be found in your DOS manual about ANSI codes
and ANSI.SYS, but for purposes of KBBS and this manual, the
following standard ANSI codes are used. Esc is the escape code
(ASCII #27) and n, x, y are to be replaced with numbers:
Esc [ y ; x H (not lower case h) move cursor to line y and col x
Esc [ n A (not lower case a) move cursor up n lines
Esc [ n B (not lower case b) move cursor down n lines
Esc [ n C (not lower case c) move cursor to right n columns
Esc [ n D (not lower case d) move cursor to left n columns
Esc [ 2 J (not lower case j) clear screen and move cursor home
Esc [ K (not lower case k) clear from cursor to end of line
Esc [ n m
Esc [ n ; n m
Esc [ n ; n ; n m (not a capital M)
This sequence controls colors, blinking, high and low intensity.
Several codes can be included when separated by a semicolon (;).
Replace the n with the following number(s) for:
0 turn off blinking, use low intensity, gray on black
1 turn on high intensity (bold)
5 turn on blinking
Text Color Background
30 Black 40
31 Red 41
32 Green 42
33 Yellow 43
34 Blue 44
35 Magenta 45
36 Cyan 46
37 White 47
Other ANSI codes are not supported by KBBS and some MODEM
software. The ANSI codes above are standard and will work with
most terminal software.
Here is an example of an ANSI control code:
<- [ 22 ; 1 H
|_| | | | |____ Cursor Position
| | | |______ Column Number
| | |________ Separates Numbers
| |__________ Line Number
|______________ ANSI code prefix
Some text editors allow you to include the escape character in
your text. It's ASCII code is #27. DOS allows you to type a
character that is not on your keyboard by holding down the LEFT
ALT KEY and typing the ASCII code on the number pad. Notice that
using the RIGHT ALT KEY won't work, and using the numbers on top
of your keyboard won't work either. When displayed on the screen,
it looks like a tiny left arrow (<-).